function demoDrawableTargets(delay)
% Demonstrate one or more targets, allow visual inspection.

if nargin < 1
    delay = 2;
end

% access the manager that deals with drawing
dotsTheDrawablesManager.reset();
dm = dotsTheDrawablesManager.theObject;
dm.openScreenWindow;

% create an arcs object and add it to an arbitrary group
t = dm.newObject('dotsDrawableTargets');
group = 'demo';
dm.addObjectToGroup(t, group);
dm.activateGroup(group);

% "draw" invisible targets
t.isVisible = false;
dm.mayDrawNextFrame();
pause(delay);

% "draw" zero targets
t.isVisible = true;
t.x = [];
t.y = [];
dm.mayDrawNextFrame();
pause(delay);

% draw one target
t.smooth = false;
t.x = 0;
t.y = 0;
dm.mayDrawNextFrame();
pause(delay);

% draw one fat target
t.size = 5;
t.color = [255 0 0];
dm.mayDrawNextFrame();
pause(delay);

% draw many targets
n = 10;
t.x = linspace(-10, 10, n);
t.y = linspace(-5, 5, n);
t.size = .5;
dm.mayDrawNextFrame();
pause(delay);

% draw each target shape
t.size = 2;
t.color = [0 128 64];
t.shape = 0;
dm.mayDrawNextFrame();
pause(delay);

t.shape = 1;
dm.mayDrawNextFrame();
pause(delay);

% try to smooth the target edges
t.smooth = true;
dm.mayDrawNextFrame();
pause(delay);

% close the OpenGL drawing window
dm.closeScreenWindow;